<template>
  <table border="1" style="border-collapse: collapse">
    <caption>
      <slot name="title">
      </slot>
    </caption>
          <thead>
              <tr>
                  <th>编号</th>
                  <th>资产名称</th>
                  <th>价格</th>
                  <th>创建时间</th>
                  <th>操作</th>
              </tr>
          </thead>
          <thead>
              <tr v-for="(item,index) in list" :key="index">
                  <td>
                    <slot name="index" :index="index">
                      {{index}}
                    </slot>
                  </td>
                  <td>
                    <slot name="goodsName" :goodsName="item.name">
                      {{ item.name }}
                    </slot>
                  </td>
                  <td>
                    <slot name="price" :price="item.price">
                      {{item.price}}
                    </slot>
                  </td>
                 <td>
                    <slot name="time" :time="item.time">
                      {{item.time}}
                    </slot>
                  </td>
                  <td>
                    <slot name="action" >
                      <a href="javascript:;"></a>
                    </slot>
                  </td>
              </tr>
          </thead>
      </table>
</template>

<script>
export default {
  props: {
    list: {
      required: true,
      type: Array
    }
  },
  data () {
    return {

    }
  },

  created () {

  },

  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
